﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="NodeAdd.aspx.cs" Inherits="CreateStaticHtml.Pages.NodeAdd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div style="min-height: 600px;">
        <%
            if (IsLogin)
            {
        %>
        <h2>
            添加节点
        </h2>
        <p>
            请输入节点信息。
            <input type="hidden" id="parentid" name="parentid" value="<%= Request.QueryString["parentnodeid"] %>" />
            <asp:HyperLink ID="RegisterHyperLink" runat="server" EnableViewState="false">返回</asp:HyperLink>
            <input type="hidden" name="scount" id="scount" value="0" />
        </p>
        <span class="failureNotification">
            <asp:Literal ID="FailureText" runat="server"></asp:Literal>
        </span>
        <div class="accountInfo" style="width: 90%;">
            <fieldset class="login">
                <legend>节点信息</legend>
                <p>
                    节点名称：<asp:TextBox ID="UserName" runat="server" CssClass="textEntry" Style="width: 90%;"></asp:TextBox>
                </p>
                <p>
                    英文名称：<input type="text" name="ename" class="textEntry" style="width: 90%;" />
                </p>
                <div id="sectionblock">
                </div>
                <p>
                    <input type="button" value="增加段落" style="width: 100px;" onclick="addSection()" />
                </p>
            </fieldset>
            <p class="submitButton">
                <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="确定" OnClick="LoginButton_Click"
                    ValidationGroup="LoginUserValidationGroup" />
            </p>
        </div>
        <%
            }
        %>
    </div>
    <script type="text/javascript">
        var allcount = 1;
        function addSection() {
            $("#scount").val(allcount);
            $("#sectionblock").append("<p>段落" + allcount + "：<textarea type=\"text\" name=\"section" + allcount + "\" class=\"textEntry\" style=\"width:89%;height:100px;\" ></textarea></p>");
            allcount++;
            //    $("#sectionblock").append("<p></p><br/>");
        }
    </script>
</asp:Content>
